﻿using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
using XDQ.VAT.DataSeeder;

namespace XDQ.VAT.EntityFrameworkCore
{
    [DependsOn(
        typeof(VATEntityFrameworkCoreModule)
        )]
    public class VATEntityFrameworkCoreDbMigrationsModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            VATDbContextModelCreatingExtensions.ChangeAbpStatic();
            context.Services.AddAbpDbContext<VATMigrationsDbContext>();

            Configure<Volo.Abp.Data.AbpDataSeedOptions>(options =>
            {
                // 如果已经注入，则不需要再绑定
                //options.Contributors.Add<IdentityServer.VATIdentityDataSeedContributor>();
                //options.Contributors.Add<VATEduDataSeedContributor>();
            });
        }
    }
}
